<?php
class View_Administration_User_Edit extends View_Administration_User
{
	/**
	 *	Builds edit User View.
	 *	@access		public
	 *	@return		string
	 */
	public function buildContent()
	{
		$config		= $this->registry->get( 'config' );
		$request	= $this->registry->get( 'request' );
		$auth		= $this->registry->get( 'auth' );
		$words		= $this->words['user']['editUser'];
		$userId		= $request->get( 'userId' );
		$user		= new Model_User( $userId );
		$data		= $user->get();
		$sources	= array();
		$ui			= array(
			'words'		=> $words,
			'form'		=> $this->buildForm(
				'administration/user',
				'editUser',
				'user',
				'editUser',
				$data,
				$sources
			),
			'buttonCancel'	=> $this->html->LinkButton(
				"?link=".$request->get( 'link' ),
				$words['button_cancel'],
				'but cancel'
			),
			'buttonEdit'	=> $this->html->Button(
				'editUser',
				$words['button_edit'],
				'but edit'
			),
			'form.tag'		=> $this->html->Form(
				'editUser',
				"?link=".$request->get( 'link' )."&userId=".$userId
			),
			'colgroup'		=> $this->html->ColumnGroup( $words['colgroup'] ),
			'caption'		=> $this->html->TableCaption( $words['caption'], 'edit' ),
		);

		return $this->loadTemplate( 'administration.user.edit', $ui );
	}
}
?>